Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXB-3199 - Unable to upload to S3 if object lock and retention periods are enabled. #1522

Open
wants to merge 1 commit into
base: 8.0
Choose a base branch
from

Conversation

vovler
Copy link

@vovler vovler commented Nov 9, 2023

PXB-3199: Unable to upload to S3 if object lock and retention periods are enabled.

https://jira.percona.com/browse/PXB-3199

Problem:

xbcloud cannot upload to S3 if object lock and retention periods are enabled.
It fails with error message:

S3 error message: Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters

Amazon S3 requires MD5 checksum to be part of header if object lock and retention periods are enabled.
See https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
"The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock."

Fix:

As required by S3 documentation, add the MD5 checksum to the header.

…ckblaze upload incase Object Lock is activated
@it-percona-cla
Copy link

it-percona-cla commented Nov 9, 2023

CLA assistant check
All committers have signed the CLA.

@altmannmarcelo
Copy link
Contributor

Hi @vovler .
Thanks for your contribution. I have created a proper ticket for your contribution and will get it reviewed as time allows.
https://jira.percona.com/browse/PXB-3199

@satya-bodapati
Copy link
Contributor

I deleted earlier message, I am able to reproduce this. (Used the wrong bucket 🤦 ) I will proceed to include this next release of 8.0

@satya-bodapati satya-bodapati changed the title Update s3.cc to add Content-MD5 header to V4 S3 api PXB-3199 Update s3.cc to add Content-MD5 header to V4 S3 api Dec 13, 2024
@satya-bodapati satya-bodapati changed the title PXB-3199 Update s3.cc to add Content-MD5 header to V4 S3 api PXB-3199 - Unable to upload to S3 if object lock and retention periods are enabled. Dec 13, 2024
@satya-bodapati
Copy link
Contributor

satya-bodapati commented Dec 13, 2024

@vovler can you please add the following commit message:

PXB-3199: Unable to upload to S3 if object lock and retention periods are enabled.

https://jira.percona.com/browse/PXB-3199

Problem:
------------
xbcloud cannot upload to S3 if object lock and retention periods are enabled.
It fails with error message:

S3 error message: Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters

Amazon S3 requires MD5 checksum to be part of header if object lock and retention periods are enabled.
See https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
"The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock."

Fix:
-----
As required by S3 documentation,  add the MD5 checksum to the header.

Once you fix the commit message, it will be easier for me to merge.

@satya-bodapati satya-bodapati self-requested a review December 13, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants